package com.wt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/provider")
public class ProviderController {
    @Value("${server.port}")//到注册中心取出端口号
    private String port;

    @GetMapping
    public String test(){
        System.out.println("--------生产者-------");
        return port;
    }
}
